Dynomotion

Group: DynoMotion Message: 9728 From: Russ Larson Date: 6/28/2014
Subject: External Button Pushes

Tom,

 

We have most of the KFLOP working on the machine now.  We have motion, homing, MPG all working.  Our biggest struggle is external buttons getting that info to respond in MACH3. 

 

We have used the C example ExternalButtons.c and used a switch on the MPG for cycle start and loaded some gcode in mach3.  The plugin has this loading into thread4.  We can see the button on Kmotion on the IO screen perfect. 

 

We have this narrowed down to the DoPC(PC_COMM_EXECUTE);

 

 

}while (result=persist.UserData[PC_COMM_PERSIST]>0);    The program never seems to see the Persist data for the MACH3 handshake.

 

 

We have beat our heads against the wall and tried commenting everything out but one command and nothing that uses these DoPC calls works.  We can send stuff from Mach3 to Kmotion that always works fine.  We just can't get it to work the other way around.

 

We must be missing something simple, but just can't seem to figure this out.  So much is working this has to be something simple.

 

Any idea what we are doing wrong?

 

Russ

 

 

 

 

 

 

 


Posted by: TK <tk@...>


Group: DynoMotion Message: 9731 From: Tom Kerekes Date: 6/28/2014
Subject: Re: External Button Pushes
Hi Russ,

The KFLOP to PC commands are only supported in KMotionCNC.

To configure external buttons in Mach3:

Configure an OEM Trigger input.  For example set:

Config | Ports and Pins | Inputs | OEM Trig #1 Pin46 Port1

also

Config | System Hot Keys | External Buttons | Trigger #1 = 1000

OEM code 1000 is for Cycle Start from:

Now toggling IO 46 on the KMotion Digital IO screen should perform a Cycle Start in Mach3

HTH
Regards
TK



From: "'Russ Larson' rdlarson@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Saturday, June 28, 2014 7:14 AM
Subject: [DynoMotion] External Button Pushes

 
Tom,
 
We have most of the KFLOP working on the machine now.  We have motion, homing, MPG all working.  Our biggest struggle is external buttons getting that info to respond in MACH3. 
 
We have used the C example ExternalButtons.c and used a switch on the MPG for cycle start and loaded some gcode in mach3.  The plugin has this loading into thread4.  We can see the button on Kmotion on the IO screen perfect. 
 
We have this narrowed down to the DoPC(PC_COMM_EXECUTE);
 
 
}while (result=persist.UserData[PC_COMM_PERSIST]>0);    The program never seems to see the Persist data for the MACH3 handshake.
 
 
We have beat our heads against the wall and tried commenting everything out but one command and nothing that uses these DoPC calls works.  We can send stuff from Mach3 to Kmotion that always works fine.  We just can't get it to work the other way around.
 
We must be missing something simple, but just can't seem to figure this out.  So much is working this has to be something simple.
 
Any idea what we are doing wrong?
 
Russ
 
 
 
 
 
 
 

Posted by: TK <tk@...>



Group: DynoMotion Message: 9733 From: Russ Larson Date: 6/28/2014
Subject: Re: External Button Pushes

Thanks Tom,

 

I knew I should have sent you an email two days ago, we pounded are heads on the wall working on something that would never work.  LOL   Thanks again for you help.

 

Russ

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Saturday, June 28, 2014 3:47 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] External Button Pushes

 

 

Hi Russ,

 

The KFLOP to PC commands are only supported in KMotionCNC.

 

To configure external buttons in Mach3:

 

Configure an OEM Trigger input.  For example set:

 

Config | Ports and Pins | Inputs | OEM Trig #1 Pin46 Port1

 

also

 

Config | System Hot Keys | External Buttons | Trigger #1 = 1000

 

OEM code 1000 is for Cycle Start from:

 

Now toggling IO 46 on the KMotion Digital IO screen should perform a Cycle Start in Mach3

 

HTH

Regards

TK

 

 


From: "'Russ Larson' rdlarson@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Saturday, June 28, 2014 7:14 AM
Subject: [DynoMotion] External Button Pushes

 

 

Tom,

 

We have most of the KFLOP working on the machine now.  We have motion, homing, MPG all working.  Our biggest struggle is external buttons getting that info to respond in MACH3. 

 

We have used the C example ExternalButtons.c and used a switch on the MPG for cycle start and loaded some gcode in mach3.  The plugin has this loading into thread4.  We can see the button on Kmotion on the IO screen perfect. 

 

We have this narrowed down to the DoPC(PC_COMM_EXECUTE);

 

 

}while (result=persist.UserData[PC_COMM_PERSIST]>0);    The program never seems to see the Persist data for the MACH3 handshake.

 

 

We have beat our heads against the wall and tried commenting everything out but one command and nothing that uses these DoPC calls works.  We can send stuff from Mach3 to Kmotion that always works fine.  We just can't get it to work the other way around.

 

We must be missing something simple, but just can't seem to figure this out.  So much is working this has to be something simple.

 

Any idea what we are doing wrong?

 

Russ

 

 

 

 

 

 

 


Posted by: TK <tk@...>


 

Group: DynoMotion Message: 9741 From: Russ Larson Date: 6/30/2014
Subject: External Button Pushes
Attachments :

    Tom,

     

    Thanks for your help, that recommendation allowed us to implement the cycle start and pause buttons.  The pendant uses the MPG to adjust feedrate override and spindle override.  I saw some sample code for KMotionCNC but nothing for MACH3.  Is there some sample code on how people implemented having the MPG adjust the feedrate and spindle speed as overrides?  Many pendants has the rotary switch for X,Y,Z,A and  Feed and Spindle which take the MPG input as the override percentage.  It would calculate spindle or feedrate +/- override  based on turning the MPG in Kflop and just update Mach3.

     

    p5_v2_m.jpg

     

     

     

    Another thing we noticed, when we zero the encoders in KFLOP they are not getting updated in Mach3.

     

    Is there a way to have the Cycle Start LED in Mach3 trigger a KFLOP IO pin?  This could be used to help keep things in sync with the kflop c code.

     

    We are really getting excited the movement is very smooth and almost everything is working again.  Thanks for all the help and advise.  Lots of questions, I know so sorry.  :)

     

    Russ

     

     

     

    From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
    Sent: Saturday, June 28, 2014 3:47 PM
    To: DynoMotion@yahoogroups.com
    Subject: Re: [DynoMotion] External Button Pushes

     

     

    Hi Russ,

     

    The KFLOP to PC commands are only supported in KMotionCNC.

     

    To configure external buttons in Mach3:

     

    Configure an OEM Trigger input.  For example set:

     

    Config | Ports and Pins | Inputs | OEM Trig #1 Pin46 Port1

     

    also

     

    Config | System Hot Keys | External Buttons | Trigger #1 = 1000

     

    OEM code 1000 is for Cycle Start from:

     

    Now toggling IO 46 on the KMotion Digital IO screen should perform a Cycle Start in Mach3

     

    HTH

    Regards

    TK

     

     


    From: "'Russ Larson' rdlarson@... [DynoMotion]" <DynoMotion@yahoogroups.com>
    To: DynoMotion@yahoogroups.com
    Sent: Saturday, June 28, 2014 7:14 AM
    Subject: [DynoMotion] External Button Pushes

     

     

    Tom,

     

    We have most of the KFLOP working on the machine now.  We have motion, homing, MPG all working.  Our biggest struggle is external buttons getting that info to respond in MACH3. 

     

    We have used the C example ExternalButtons.c and used a switch on the MPG for cycle start and loaded some gcode in mach3.  The plugin has this loading into thread4.  We can see the button on Kmotion on the IO screen perfect. 

     

    We have this narrowed down to the DoPC(PC_COMM_EXECUTE);

     

     

    }while (result=persist.UserData[PC_COMM_PERSIST]>0);    The program never seems to see the Persist data for the MACH3 handshake.

     

     

    We have beat our heads against the wall and tried commenting everything out but one command and nothing that uses these DoPC calls works.  We can send stuff from Mach3 to Kmotion that always works fine.  We just can't get it to work the other way around.

     

    We must be missing something simple, but just can't seem to figure this out.  So much is working this has to be something simple.

     

    Any idea what we are doing wrong?

     

    Russ

     

     

     

     

     

     

     


    Posted by: TK <tk@...>


     

    Group: DynoMotion Message: 9744 From: Tom Kerekes Date: 6/30/2014
    Subject: Re: External Button Pushes
    Hi Russ,

    I'm not sure how to change the Mach3 Overrides from VB or the Plugin.  Do you?

    Regarding Zero Encoders.  Have you made the changes described here:

    The basic idea is to have KFLOP set its commanded destination to wherever the Encoder reads.  Then Mach3 computes a work offset to make the current GCode Position Zero.

    Regarding Cycle Start LED:  There is a Macro definition in KFLOP called JOB_ACTIVE.  Would that work for you?

    Regards
    TK



    From: "'Russ Larson' rdlarson@... [DynoMotion]" <DynoMotion@yahoogroups.com>
    To: DynoMotion@yahoogroups.com
    Sent: Monday, June 30, 2014 5:30 AM
    Subject: [DynoMotion] External Button Pushes

     
    Tom,
     
    Thanks for your help, that recommendation allowed us to implement the cycle start and pause buttons.  The pendant uses the MPG to adjust feedrate override and spindle override.  I saw some sample code for KMotionCNC but nothing for MACH3.  Is there some sample code on how people implemented having the MPG adjust the feedrate and spindle speed as overrides?  Many pendants has the rotary switch for X,Y,Z,A and  Feed and Spindle which take the MPG input as the override percentage.  It would calculate spindle or feedrate +/- override  based on turning the MPG in Kflop and just update Mach3.
     
    p5_v2_m.jpg
     
     
     
    Another thing we noticed, when we zero the encoders in KFLOP they are not getting updated in Mach3.
     
    Is there a way to have the Cycle Start LED in Mach3 trigger a KFLOP IO pin?  This could be used to help keep things in sync with the kflop c code.
     
    We are really getting excited the movement is very smooth and almost everything is working again.  Thanks for all the help and advise.  Lots of questions, I know so sorry.  :)
     
    Russ
     
     
     
    From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
    Sent: Saturday, June 28, 2014 3:47 PM
    To: DynoMotion@yahoogroups.com
    Subject: Re: [DynoMotion] External Button Pushes
     
     
    Hi Russ,
     
    The KFLOP to PC commands are only supported in KMotionCNC.
     
    To configure external buttons in Mach3:
     
    Configure an OEM Trigger input.  For example set:
     
    Config | Ports and Pins | Inputs | OEM Trig #1 Pin46 Port1
     
    also
     
    Config | System Hot Keys | External Buttons | Trigger #1 = 1000
     
    OEM code 1000 is for Cycle Start from:
     
    Now toggling IO 46 on the KMotion Digital IO screen should perform a Cycle Start in Mach3
     
    HTH
    Regards
    TK
     
     

    From: "'Russ Larson' rdlarson@... [DynoMotion]" <DynoMotion@yahoogroups.com>
    To: DynoMotion@yahoogroups.com
    Sent: Saturday, June 28, 2014 7:14 AM
    Subject: [DynoMotion] External Button Pushes
     
     
    Tom,
     
    We have most of the KFLOP working on the machine now.  We have motion, homing, MPG all working.  Our biggest struggle is external buttons getting that info to respond in MACH3. 
     
    We have used the C example ExternalButtons.c and used a switch on the MPG for cycle start and loaded some gcode in mach3.  The plugin has this loading into thread4.  We can see the button on Kmotion on the IO screen perfect. 
     
    We have this narrowed down to the DoPC(PC_COMM_EXECUTE);
     
     
    }while (result=persist.UserData[PC_COMM_PERSIST]>0);    The program never seems to see the Persist data for the MACH3 handshake.
     
     
    We have beat our heads against the wall and tried commenting everything out but one command and nothing that uses these DoPC calls works.  We can send stuff from Mach3 to Kmotion that always works fine.  We just can't get it to work the other way around.
     
    We must be missing something simple, but just can't seem to figure this out.  So much is working this has to be something simple.
     
    Any idea what we are doing wrong?
     
    Russ
     
     
     
     
     
     
     

    Posted by: TK <tk@...>